package com.charmzenus.it.order.controller;

import com.charmzenus.it.common.dto.response.BaseResponseDTO;
import com.charmzenus.it.common.dto.response.OrderItemDTO;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/order")
public class OrderController {

    @PostMapping("/getList")
    public BaseResponseDTO<OrderItemDTO> getList(String orderName) {
        BaseResponseDTO<OrderItemDTO> tmp = new BaseResponseDTO<>();

        System.out.println(orderName);
        OrderItemDTO itemDTO = new OrderItemDTO("IphoneXs", 1);
        tmp.setData(itemDTO);
        return tmp;
    }

    @GetMapping("/orderTest")
    public BaseResponseDTO<String> orderTest( String name) {
        BaseResponseDTO<String> tmp = new BaseResponseDTO<>();
        tmp.setData("hello Feign");
        System.out.println(name);

        return tmp;
    }
}
